package demoMod.invincibleOne.cards.invincible;

import basemod.abstracts.CustomSavable;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.localization.CardStrings;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import demoMod.invincibleOne.InvincibleOneMod;
import demoMod.invincibleOne.enums.CardTagsEnum;
import demoMod.invincibleOne.interfaces.IOnAddToMasterDeck;

@Deprecated
public class Deeper extends AbstractInvincibleCard implements CustomSavable<Integer>, IOnAddToMasterDeck {
    public static final String ID = InvincibleOneMod.makeID("Deeper");

    private static final CardStrings cardStrings = CardCrawlGame.languagePack.getCardStrings(ID);
    public static final String NAME = cardStrings.NAME;
    public static final String DESCRIPTION = cardStrings.DESCRIPTION;
    public static final String IMG_PATH = "cards/todo";

    private static final CardType TYPE = CardType.SKILL;
    private static final CardRarity RARITY = CardRarity.COMMON;
    private static final CardTarget TARGET = CardTarget.NONE;

    private static final int COST = -2;

    public Deeper() {
        super(ID, NAME, InvincibleOneMod.getResourcePath(IMG_PATH), COST, DESCRIPTION, TYPE, RARITY, TARGET);
        this.tags.add(CardTagsEnum.ALERT);
    }

    @Override
    public boolean canUpgrade() {
        return false;
    }

    @Override
    public void onAddToMasterDeck() {
        AbstractDungeon.cardBlizzRandomizer--;
        AbstractDungeon.cardBlizzStartOffset--;
    }

    @Override
    public Runnable getUpgradeAction() {
        return () -> {};
    }

    @Override
    public void use(AbstractPlayer p, AbstractMonster m) {

    }

    @Override
    public Integer onSave() {
        return AbstractDungeon.cardBlizzStartOffset;
    }

    @Override
    public void onLoad(Integer integer) {
        if (integer != null) {
            AbstractDungeon.cardBlizzStartOffset = integer;
        }
    }
}
